package net.homelinux.chaoswg.io.renga.krypto.datatypes.numerical;

import java.math.BigInteger;

public class Unsigned128Bit extends UnsignedNBit  {
    public static final BigInteger MAX = new BigInteger("340282366920938463463374607431768211455");
    public static final BigInteger MOD = MAX.add(new BigInteger("1"));
    public static final int n = 128;

    public Unsigned128Bit () {
    }
    
    public Unsigned128Bit (final BigInteger val) {
        if (val.compareTo(MIN) < 0 || val.compareTo(MAX) > 0) {
            throw new IllegalArgumentException ();
        } else {
            this.value = val;
        }
    }
    
    public Unsigned128Bit (final Unsigned128Bit u128b) {
        this.value = new BigInteger (u128b.value.toByteArray());
    }
    
    public BigInteger getMAX () {
        return MAX; 
    }
    
    public BigInteger getMOD () {
        return MOD;
    }
    
    public int getN () {
        return n;
    }
}
